package com.badshun.box2d;

import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Box2DDebugRenderer;
import com.badlogic.gdx.physics.box2d.World;

public class Box2DWorld {	
	public World world;
	private Box2DDebugRenderer renderer;
	private OrthographicCamera camera;
	
	public Box2DWorld(OrthographicCamera camera) {
		this.camera = camera;
		
		world = new World(new Vector2(0, 0), true);
		renderer = new Box2DDebugRenderer();
	}
	
	public void render() {
		world.step(1 / 60f, 6, 2);
		renderer.render(world, camera.combined);
	}
}























